package main

import (
	"litetalk/api"
	"litetalk/connect"
	"litetalk/task"
	"os"
	"os/signal"
	"syscall"

	"github.com/sirupsen/logrus"
)

func main() {
	api.GoRun()
	logrus.Infof("start api server")

	connect.GoTcp()
	logrus.Infof("start connect tcp server")

	connect.GoWS()
	logrus.Infof("start connect websocket server")

	task.GoRun()
	logrus.Infof("start task server")

	quit := make(chan os.Signal, 1)
	signal.Notify(quit, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
	<-quit
	logrus.Info("Server exiting")
}
